﻿#pragma once

#include <QtWidgets/QWidget>
#include "ui_Qt7ButtonsApp.h"

class Qt7ButtonsApp : public QWidget
{
    Q_OBJECT

public:
    Qt7ButtonsApp(QWidget *parent = nullptr);
    ~Qt7ButtonsApp();
	void initTextEdit();
	void testFunction();

public slots:
	void on_chbSwim_clicked();
	void stateChangedSlot(int nState);
	void on_rbtnFemale_clicked();
	void buttonGroupSlot(int nID);
	void provinceComboBoxChangedSlot(int nIndex);
	void provinceComboBoxChangedStringSlot(QString strText);
	// 自动关联
	void on_cbxProvince_currentIndexChanged(int nIndex);
	void on_cbxFont_currentFontChanged(const QFont &font);
	void on_lineEditNormal_editingFinished();
	void on_btnSetText_clicked();
	void on_btnGetText_clicked();
	void on_textEdit_textChanged();
	// 正则表达式练习
	void on_btnRegexp_clicked();
	// 时间日期槽函数
	void on_btnReadDateTime_clicked();
	void on_btnSetTime_clicked();
	void on_btnSetDate_clicked();
	void on_btnSetDateTime_clicked();

	// 滑动条的valueChanged信号对应的槽函数
	void sliderValueChangeSlot();
	void on_spinBox_valueChanged(QString strText);


private:
    Ui::Qt7ButtonsAppClass ui;
	QButtonGroup *m_pButtonGroup = nullptr;
	bool m_bGender = false;
	QScrollBar *m_pHorScrollBar = nullptr;
	QScrollBar *m_pVerScrollBar = nullptr;
};
